<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateTripsTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateTripsLabel_routeId}" for="routeId" />
                    <h:inputText id="routeId" value="#{tripsController.selected.routeId}" title="#{bundle.CreateTripsTitle_routeId}" required="true" requiredMessage="#{bundle.CreateTripsRequiredMessage_routeId}"/>
                    <h:outputLabel value="#{bundle.CreateTripsLabel_serviceId}" for="serviceId" />
                    <h:inputText id="serviceId" value="#{tripsController.selected.serviceId}" title="#{bundle.CreateTripsTitle_serviceId}" required="true" requiredMessage="#{bundle.CreateTripsRequiredMessage_serviceId}"/>
                    <h:outputLabel value="#{bundle.CreateTripsLabel_tripId}" for="tripId" />
                    <h:inputText id="tripId" value="#{tripsController.selected.tripId}" title="#{bundle.CreateTripsTitle_tripId}" required="true" requiredMessage="#{bundle.CreateTripsRequiredMessage_tripId}"/>
                    <h:outputLabel value="#{bundle.CreateTripsLabel_tripHeadsign}" for="tripHeadsign" />
                    <h:inputText id="tripHeadsign" value="#{tripsController.selected.tripHeadsign}" title="#{bundle.CreateTripsTitle_tripHeadsign}" />
                    <h:outputLabel value="#{bundle.CreateTripsLabel_tripShortName}" for="tripShortName" />
                    <h:inputText id="tripShortName" value="#{tripsController.selected.tripShortName}" title="#{bundle.CreateTripsTitle_tripShortName}" />
                    <h:outputLabel value="#{bundle.CreateTripsLabel_directionId}" for="directionId" />
                    <h:inputText id="directionId" value="#{tripsController.selected.directionId}" title="#{bundle.CreateTripsTitle_directionId}" />
                    <h:outputLabel value="#{bundle.CreateTripsLabel_blockId}" for="blockId" />
                    <h:inputText id="blockId" value="#{tripsController.selected.blockId}" title="#{bundle.CreateTripsTitle_blockId}" />
                    <h:outputLabel value="#{bundle.CreateTripsLabel_shapeId}" for="shapeId" />
                    <h:inputText id="shapeId" value="#{tripsController.selected.shapeId}" title="#{bundle.CreateTripsTitle_shapeId}" required="true" requiredMessage="#{bundle.CreateTripsRequiredMessage_shapeId}"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{tripsController.create}" value="#{bundle.CreateTripsSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{tripsController.prepareList}" value="#{bundle.CreateTripsShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateTripsIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
